package cn.iocoder.yudao.module.dbit.dal.mysql.jobtitles;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dbit.dal.dataobject.jobtitles.JobTitlesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dbit.controller.admin.jobtitles.vo.*;

/**
 * 职位名称 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface JobTitlesMapper extends BaseMapperX<JobTitlesDO> {

    default PageResult<JobTitlesDO> selectPage(JobTitlesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<JobTitlesDO>()
                .eqIfPresent(JobTitlesDO::getJobTitle, reqVO.getJobTitle())
                .eqIfPresent(JobTitlesDO::getDescription, reqVO.getDescription())
                .orderByDesc(JobTitlesDO::getJobTitleId));
    }

}